/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import javax.validation.constraints.NotBlank;

/**
* @description /
* @author qiang
* @date 2023-09-25
**/
@Data
@TableName("sys_stability_control")
public class SysStabilityControl implements Serializable {

    @TableId(value = "control_id", type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long controlId;

    @ApiModelProperty(value = "自定义编号")
    private Long number;

    @NotBlank
    @ApiModelProperty(value = "稳控系统名称")
    private String name;

    @ApiModelProperty(value = "是否子系统")
    private Integer isSubSystem;

    @ApiModelProperty(value = "上级稳控系统ID")
    private Integer supSystem;

    @ApiModelProperty(value = "系统管理单位")
    private String sysMangeUnit;

    @ApiModelProperty(value = "调度单位ID")
    private Integer unitId;

    @ApiModelProperty(value = "区域")
    private String area;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "创建时间")
    private Timestamp createTime;

    @ApiModelProperty(value = "修改时间")
    private Timestamp updateTime;

    public void copy(SysStabilityControl source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
